Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging dotnet/runtime master branch back into Utf8String experiment branch. #23

Merged
merged 106 commits into from
Jul 23, 2020

Conversation

joperezr
Copy link
Member

FYI @layomia

vargaz and others added 30 commits July 17, 2020 13:02
…9517)

MonoClass-es created for ftnptr types have an implicit pointer field so their size is not
the same as the computed size.
* Enable FEATURE_METADATA_VERIFY_LAYOUTS

Feature was apparently disabled due to use of MSVC specific
preprocessor macros.

Rewrite macros to be standards compliant.

Remove *_ESCAPED macros

Add USING_ALIAS(aliasName, typeName)

Fix friend class declaration

* Fix DataTargetReader::AlignBase()

DAC_ALIGNAS macro was used to force MSVC and clang/gcc
compilers layouts to match.  Update DataTargetReader::AlignBase()
assumptions based on new layouts
Though this method is only ever callable by code that's already done the right
IsSupported check, add a redundant check to the method itself, so that when
crossgenning SPC on non-xarch platforms we won't try and compile the xarch
specific parts of this method.  This should save some time and a bit of file
size for non-xarch SPCs.

See notes on #38894 for context.
* Fix liveness of FrameListRoot

The FrameListRoot variable isn't used if `call->IsSuppressGCTransition()`, but liveness wasn't checking this.

Fix #39221
* Mark new obsoletions for .NET 5; update existing obsoletions

* Exclude DirectoryServicesPermission/DirectoryServicesPermissionAttribute from obsoletions for now

* No need to restore SYSLIB0003 at end of Forwards files

* Use a common Obsoletions.cs file for all SYSLIB obsoletions

* Resurrect CER code behind #ifdef in EventSource

* Mark GlobalAssemblyCache overrides as Obsolete

* Suppress Thread.Abort() error in ImageAnimator.Unix.cs

* Unconditionally mark RoAssembly.GlobalAssemblyCache as obsolete

* Rename MSLIB0001 to SYSLIB0001 in ref assembly

* Suppress obsoletion warnings in tests

* Adopt a uniform #ifdef for NET50_OBSOLETIONS

* Fix BinaryFormatter obsoletion message after the rebase

* Use SYSTEM_PRIVATE_CORELIB constant instead of NETCOREAPP

* Remove the code comment on the ifdef

* Apply feedback related to CER obsoletions

* Apply feedback related to CAS

* Update ref assembly to reflect SecurityManager obsoletion

* Fix regression in System.IO.Pipes.NamedPipeServerStream.Windows.RunAsClient
Some tests are very slow under GCStress for some platforms, especially
Linux arm32 and for GCStress=3. Disable these tests under GCStress.

dotnet/runtime#2231
Add methods to convert between hexadecimal strings and bytes, and converts internal usage to use those APIs when possible, or reuse the shared code as helpers otherwise.
…9567)

GetBreakingChangeVersion(int* version)

Used in SOS to check if any of the runtime data structures it depends on has changed.

Issue: dotnet/runtime#27309
<!--
Thank you for your Pull Request!

If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.

Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->

I've been noticing some C compiler warnings during build of dotnet/runtime.
```
  C:\Users\gotos\source\repos\runtime\src\mono\mono\mini\mini-runtime.c(1920,1): warning C4819: The file contains a character that cannot be represented in the current code page (949). Save the file in Unicode format to prevent data loss [C:\Users\gotos\source\repos\runtime\src\mono\msvc\libmono-dynamic.vcxproj]
  C:\Users\gotos\source\repos\runtime\src\mono\mono\mini\method-to-ir.c(5337,1): warning C4819: The file contains a character that cannot be represented in the current code page (949). Save the file in Unicode format to prevent data loss [C:\Users\gotos\source\repos\runtime\src\mono\msvc\libmono-dynamic.vcxproj]
```
Apparently there are some smart quotes and a zero-width space (Why?!) in some of Mono's source code. This PR removes those needless unicode characters.

I hope that opening a PR here will result in the changed code being mirrored to dotnet/runtime repo as well?

Co-authored-by: Gnbrkm41 <[email protected]>
…(#39551)

* Remove unused local variables and methods from System.Drawing.Common

Remove unused locals, and update a few unit tests that has no asserts.

* Revert adding asserts in tests

Since the tests run across different printer hardware they can't take a
dependency on the default printer settings. Revert adding asserts in
these cases so the tests still verify that the properties don't throw.
* Remove unused locals in System.IO.FileSystem.AccessControl

* Removed unused locals in System.IO.FileSystem.DriveInfo

* Remove unused locals and methods in System.IO.FileSystem
This is to help validate that timeouts are what we think.
* Disable Vector tests failing under GCStress

Issues:
dotnet/runtime#39576
dotnet/runtime#39579

* Also disable Vector256_1_r/Vector_1_ro tests

Issue: dotnet/runtime#39581
Also changed visibility in some tests from `private` to `public` to
follow the other code in the project and prevent the compiler from
thinking the tests are unused.
…9544)

* Remove unused locals in System.Configuration.ConfigurationManager

Removed unused locals, and where needed updated tests in
System.Configuration.ConfigurationManager.

* Update GetHashCode test
* Use static lambdas in System.Net.Http

This caught one bug that was causing an unexpected/undesirable closure.

* Use static lambdas in System.Private.CoreLib

* Use static lambdas in System.Net.WebSockets

* Use static lambdas in System.Threading.Channels
This change replaces SELECTANY by using constexpr. It results in major
reduction of the native binaries size (3.2MB in the libcoreclr.so case)
The method "EnsureCapacity" does not check whether resizing
is necessary, thus the comments should not contain the conditional
clause.

Fix #39526
* Revert "delete test project. (#39501)"

This reverts commit ecb231c.

* Fix ILVerification tests
- Re-enable the test project build
- Change string resources in type system to directly use ResourceManager instead of SR abstraction which is unavaliable in the test build tree
- Add test to verify that all ExceptionStringID values have associated strings
- Use ToolsCommonPath property to successfully reference the correct resource file

* Address feedback and allow the strings to be handled with a runtime implementation
* Annotate and adjust more of CoreLib for trimming

* Update CustomAttribute.cs

* Update TypeBuilder.Mono.cs
* [interp] Use constant for concurrent collection in progress

Saves 4k on wasm.

* [sgen] Use constant for concurrent sweep

Saves 0.5k on wasm

* [sgen] Remove code from threadpool when not using concurrent mode

Saves 2.5k on wasm

* [sgen] Avoid keeping some callbacks alive

Saves 0.5k on wasm

* [sgen] Avoid registering callback if not used

* [sgen] Add option to remove binary protocol from build

Saves 5k on wasm

* [sgen] Add option to disable togglerefs

Saves 1k on wasm

* [sgen] We never need to wait for sweep if serial

Saves 0.5k on wasm

* [sgen] Disable also canaries if debug helpers are disabled

Saves 1k on wasm

* [sgen] Disable also pinning_stats if debug features are disabled

Saves 2k on wasm

* [sgen] Disable also gchandle stats if debug is disabled

Saves 1k on wasm

* [sgen] Disable also sgen logging if debugging is disabled

Saves 6k on wasm

* [runtime] Disable log messages if assert messages is disabled

This is mainly beneficial do to very common calls of g_error.

Saves 35k on wasm
@joperezr joperezr merged commit dadd699 into dotnet:Utf8String Jul 23, 2020
@joperezr joperezr deleted the Utf8String branch July 23, 2020 17:52
jkotas pushed a commit to jkotas/runtimelab that referenced this pull request Sep 13, 2020
* Thunks: support for fixed size thunk pool

Provides the platform independent (OS and CPU architecture) runtime code to support a fixed size thunk pool for systems that doesn't support any way to add more thunks on demand.

Activated with FEATURE_FIXED_POOL_THUNKS..

FEATURE_RX_THUNKS will still override this.

The default is still the template based system.

The code blocks of the pool itself need to be either build and linked as part of the executable or generated by the compiler to be included in the object file.

* fixed size thunk pool (dotnet#23)

* Thunks: support for fixed size thunk pool

Provides the platform independent (OS and CPU architecture) runtime code to support a fixed size thunk pool for systems that doesn't support any way to add more thunks on demand.

Activated with FEATURE_FIXED_POOL_THUNKS..

FEATURE_RX_THUNKS will still override this.

The default is still the template based system.

The code blocks of the pool itself need to be either build and linked as part of the executable or generated by the compiler to be included in the object file.

* Review changes

- Use PalVirtualAlloc instead of GCToOSInterface for memory operations
- Rename global variable to better match the usage
jkotas pushed a commit to jkotas/runtimelab that referenced this pull request Sep 13, 2020
* Thunks: support for fixed size thunk pool

Provides the platform independent (OS and CPU architecture) runtime code to support a fixed size thunk pool for systems that doesn't support any way to add more thunks on demand.

Activated with FEATURE_FIXED_POOL_THUNKS..

FEATURE_RX_THUNKS will still override this.

The default is still the template based system.

The code blocks of the pool itself need to be either build and linked as part of the executable or generated by the compiler to be included in the object file.

* fixed size thunk pool (dotnet#23)

* Thunks: support for fixed size thunk pool

Provides the platform independent (OS and CPU architecture) runtime code to support a fixed size thunk pool for systems that doesn't support any way to add more thunks on demand.

Activated with FEATURE_FIXED_POOL_THUNKS..

FEATURE_RX_THUNKS will still override this.

The default is still the template based system.

The code blocks of the pool itself need to be either build and linked as part of the executable or generated by the compiler to be included in the object file.

* Review changes

- Use PalVirtualAlloc instead of GCToOSInterface for memory operations
- Rename global variable to better match the usage
jkotas pushed a commit that referenced this pull request Sep 13, 2020
* Thunks: support for fixed size thunk pool

Provides the platform independent (OS and CPU architecture) runtime code to support a fixed size thunk pool for systems that doesn't support any way to add more thunks on demand.

Activated with FEATURE_FIXED_POOL_THUNKS..

FEATURE_RX_THUNKS will still override this.

The default is still the template based system.

The code blocks of the pool itself need to be either build and linked as part of the executable or generated by the compiler to be included in the object file.

* fixed size thunk pool (#23)

* Thunks: support for fixed size thunk pool

Provides the platform independent (OS and CPU architecture) runtime code to support a fixed size thunk pool for systems that doesn't support any way to add more thunks on demand.

Activated with FEATURE_FIXED_POOL_THUNKS..

FEATURE_RX_THUNKS will still override this.

The default is still the template based system.

The code blocks of the pool itself need to be either build and linked as part of the executable or generated by the compiler to be included in the object file.

* Review changes

- Use PalVirtualAlloc instead of GCToOSInterface for memory operations
- Rename global variable to better match the usage
scalablecory pushed a commit that referenced this pull request Sep 22, 2020
Includes several bug/test fixes to improve overall quality.
MichalStrehovsky pushed a commit to MichalStrehovsky/runtimelab that referenced this pull request Oct 15, 2021
This removes the need for manually aligning the instructions in the IL stream, the encoder takes care of this when necessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.